package com.hongye.area.dao;

import com.hongye.area.entity.AreaEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 
 * 
 * @author cyj
 * @email sunlightcs@gmail.com
 * @date 2022-04-22 18:50:58
 */
@Mapper
public interface AreaDao extends BaseMapper<AreaEntity> {


    @Update("update tb_area set `start_city` = `start_city` + #{increment} , `dis_city` = dis_city - #{increment} where province_id=#{pid} ")
    int updataAddStateCityReduceDisCity(@Param("pid") Integer pid, @Param("increment") int increment);
}
